#coding=utf-8
#@author: jiangxu
high = 100.0
distance = 0
lasthigh = 0
n = int(raw_input('请输入弹跳次数：'))
l = [100.0]
ll = []
try:
    if n == 1:
        print '反弹高度为%f:' % high
        print '总长度为%f:' % high
    elif n > 1:
        for i in range(n):
            currenthigh = high/2
            high = currenthigh
            distance = currenthigh * 2
            l.append(distance)
            ll.append(currenthigh)
        l.pop()
        totaldistance = sum(l)
        print '反弹高度为%f:' % ll.pop()
        print '总长度为%f:' % totaldistance
    else:
        print 'Wrong'
except Exception as e:
    print e


# #范例
# @author jiangxu
# tour = []
# height = []
#
# hei = 100.0  # 起始高度
# tim = 10  # 次数
#
# for i in range(1, tim + 1):
#     # 从第二次开始，落地时的距离应该是反弹高度乘以2（弹到最高点再落下）
#     if i == 1:
#         tour.append(hei)
#     else:
#         tour.append(2 * hei)
#     hei /= 2
#     height.append(hei)
#
# print('总高度：tour = {0}'.format(sum(tour)))
# print('第10次反弹高度：height = {0}'.format(height[-1]))






